/**
 * 发送Cici消息.
 */
let cici = require('./ciciMessage');
let ccServer = require('../login/ccServer');

let CICI = function(){

}

CICI.prototype.remindOldCCMess = function(toEmail, content, callback){
    // 发送旧版CC
    cici.send(toEmail, content, 0, 'x', (data) => {
        callback(data);
    })
}

CICI.prototype.remindMess = function(toEmail, content, linkUrl, callback){
    // 发送旧版CC
    // cici.send(toEmail, content, 0, 'x', (data) => {
    //     callback(data);
    // })
    // 发送新版CC消息
    ccServer.sendMessage(toEmail, content, linkUrl).then(data => {
        callback(data);
    })
}

CICI.prototype.remindUrl = function(toEmail, content, linkUrl, callback){
    cici.send(toEmail, content, 13, 'x', (data) => {
        callback(data);
    })
}

module.exports = new CICI();
